package configurations

import (
	"time"

	"gitlab.yunzhen-data.com/C-Chain/titan/bytesutils"
	"gitlab.yunzhen-data.com/C-Chain/titan/timeutils"
)

type HTTPClientConfiguration struct {
	// 超时时间
	DefaultTimeout timeutils.Duration `yaml:"default-timeout"`
	// 是否使用debug
	EnableDebug bool `yaml:"enable-debug"`
	// 是否使用trace
	EnableTrace bool `yaml:"enable-trace"`
}

func NewHTTPClientConfiguration() *HTTPClientConfiguration {
	return &HTTPClientConfiguration{
		DefaultTimeout: timeutils.Duration{Duration: 10 * time.Second},
		EnableDebug:    false,
		EnableTrace:    false,
	}
}

func (receiver *HTTPClientConfiguration) Section() string {
	return "http-client"
}

func (receiver *HTTPClientConfiguration) Inject() string {
	return bytesutils.EmptyString
}
